function hasSameword(s1, s2) {
    let len1 = s1.length;
    let len2 = s2.length;
    if (len1 != len2) return false;
    let obj = {}
    for (let i = 0; i < s1.length; i++) {
        obj[s1[i]] ? obj[s1[i]]++ : obj[s1[i]] = 1;
        obj[s2[i]] ? obj[s2[i]]-- : obj[s2[i]] = -1;
    }
    return Object.values(obj).every(v => v === 0)

}